package com.ls.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 权益
 * </p>
 *
 * @author pengyu
 * @since 2024-10-12
 */
@NoArgsConstructor
@Data
@EqualsAndHashCode(callSuper = false)
public class Benefit extends Model<Benefit> {
    private static final long serialVersionUID=1L;
    /**
     * 自增主键
     */
    @TableId(value = "benefit_id", type = IdType.AUTO)
    private Long benefitId;
    /**
     * 权益名称
     */
    private String benefitName;
    /**
     * 会员权益内容
     */
    private String memberContent;
    /**
     * 非会员权益内容
     */
    private String commonContent;
    /**
     * 排序规则，越小越前面
     */
    private Integer sort;
    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
    /**
     * 创建人id
     */
    private Long creatorId;
    /**
     * 修改人id
     */
    private Long updaterId;
    @Override
    protected Serializable pkVal() {
        return this.benefitId;
    }
}
